<?php

namespace App\Library\Junda\src;

use App\Library\Junda\JunDaApiClient;

/**
 *  时效 套餐
 */
class EffectiveService
{
    // 时效套餐列表
    public static function GetEffectivePackage()
    {
        $url = 'https://apiv2.ljda.net/api/GetEffectivePackage';
        $params['page'] = 1;
        $params['size'] = 10;
        $params['efftype'] = 0;
        $response = JunDaApiClient::sendRequest($url,'POST',json_encode($params));
        return $response;
    }
    // 时效套餐列表
    public static function LoadEffListByVCardId($VCardId)
    {
        $url = 'https://apiv2.ljda.net/api/LoadEffListByVCardId';
        $response = JunDaApiClient::sendRequest($url,'POST',json_encode(['VCardId'=>$VCardId]));
        return $response;
    }
    // 时效套餐列表
    public static function DeleteEffectivePackage($id)
    {
        $url = 'https://apiv2.ljda.net/api/DeleteEffectivePackage';
        $params['id'] = $id;
        $response = JunDaApiClient::sendRequest($url,'POST',json_encode($params));
        return $response;
    }
    // 时效套餐列表
    public static function DeleteEffectivePacwkage($id)
    {
        $url = 'https://apiv2.ljda.net/api/DeleteEffectivePackage';
        $params['id'] = $id;
        $response = JunDaApiClient::sendRequest($url,'POST',json_encode($params));
        return $response;
    }
    // 时效套餐列表
    public static function GetTodayEffMoneyByVCardId($VCardId)
    {
        $url = 'https://apiv2.ljda.net/api/GetTodayEffMoneyByVCardId';
        $params['VCardId'] = $VCardId;
        $response = JunDaApiClient::sendRequest($url,'POST',json_encode($params));
        return $response;
    }
}
